//
// Created by hentai on 24-11-26.
//

#include <stdio.h>
#include "cl/hotel.h"

const int arr1d[5] = {1, 2, 3, 4, 5};
const int arr2d[2][5] = {
    {1, 2, 3, 4, 5},
    {2, 3, 4, 5, 6}
};

void hotel() {
    printf("Welcome to Hotel System\n");
}

void array1d() {
    const int *p = arr1d;
    for (int i = 0; i < 5; i++) {
        printf("%d\n", *(p + i));
    }
}


void array2d() {
    const int (*p)[5] = arr2d;
    for (int i = 0; i < 2; i++) {
        // printf("%p\n", *p + i);
        const int *q = *p;
        for (int j = 0; j < 5; j++) {
            printf("%d\n", *q + j);
            // printf("%p\n", q + j);
        }
    }

    // const int *p = *arr2d;
    // for (int i = 0; i < 10; i++) {
    //     printf("%d\n", *(p + i));
    // }
}
